﻿@using FineAdmin.Model;
@{
    var BlogPostsCategorieList = ViewBag.BlogPostsCategorieList as List<BlogPostsCategorieModel>;
    BlogPostsCategorieList = BlogPostsCategorieList.Where(m => m.PId == 0).ToList();
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>@ViewBag.Title - diyuzz·小站</title>
    <link href="~/BlogStatic/layui/css/layui.css" rel="stylesheet" />
    <link href="~/BlogStatic/css/main.css" rel="stylesheet" />
    <link href="~/BlogStatic/css/huijiblog.css" rel="stylesheet" />
    @RenderSection("styles", required: true)
</head>
<body class="lay-blog">
    <div class="header">
        <div class="menu-btn">
            <div class="menu"></div>
        </div>
        <h1 class="logo">
            <a href="/Main/Index">
                <span>MYBLOG</span>
                <img src="../BlogStatic/img/logo1.png">
            </a>
        </h1>
        <div class="nav">
            @*<a href="Main" @(ViewBag.Active == "BIJI" ? "class=active" : "")>笔记</a>
                <a href="Main?p=JISHU" @(ViewBag.Active == "JISHU" ? "class=active" : "")>技术</a>
                <a href="Main?p=WANGZHUAN" @(ViewBag.Active == "WANGZHUAN" ? "class=active" : "")>网赚</a>*@

            @foreach (var item in BlogPostsCategorieList)
            {
                <a href="/Main/Index?Pid=@(item.Id)" @(ViewBag.PId == item.Id ? "class=active" : "")>@item.Name</a>
            }
            @if (ViewBag.EnableCommentSys == "1")
            {
                <a href="/Comments/Index" @(ViewBag.Active == "Comments" ? "class=active" : "")>留言</a>
            }

            <a href="/Tip/Index" @(ViewBag.Active == "Tip" ? "class=active" : "")>优惠线报</a>
            <a href="/Good/Index" @(ViewBag.Active == "Good" ? "class=active" : "")>好物推荐</a>
            <a href="/main/about" @(ViewBag.Active == "About" ? "class=active" : "")>关于</a>
            <a href="/Friendly" @(ViewBag.Active == "Friendly" ? "class=active" : "")>友情链接</a>
        </div>
        <ul class="layui-nav header-down-nav">
            @foreach (var item in BlogPostsCategorieList)
            {
                <li class="layui-nav-item">
                    <a href="/Main/Index?Pid=@(item.Id)" @(ViewBag.PId == item.Id ? "class=active" : "")>@item.Name</a>
                </li>

            }
            @if (ViewBag.EnableCommentSys == "1")
            {
                <li class="layui-nav-item">
                    <a href="/Comments/Index" @(ViewBag.Active == "Comments" ? "class=active" : "")>留言</a>
                </li>
            }
            <li class="layui-nav-item">
                <a href="/Tip/Index" @(ViewBag.Active == "Tip" ? "class=active" : "")>优惠线报</a>
            </li>
            <li class="layui-nav-item">
                <a href="/Good/Index" @(ViewBag.Active == "Good" ? "class=active" : "")>好物推荐</a>
            </li>
            <li class="layui-nav-item">
                <a href="/main/about" @(ViewBag.Active == "About" ? "class=active" : "")>关于</a>
            </li>
            <li class="layui-nav-item">
                <a href="/Friendly" @(ViewBag.Active == "Friendly" ? "class=active" : "")>友情链接</a>
            </li>
        </ul>
        <p class="welcome-text">
            欢迎来到<span class="name">diyuzz</span>的小站~
        </p>
    </div>


    @RenderBody()

    <div class="footer-wrap">
        <div class="footer w1000">
            <div class="qrcode">
                <img src="../BlogStatic/img/wx.jpg">
            </div>
            <div class="practice-mode">
                <img src="../BlogStatic/img/down_img.jpg">
                <div class="text">
                    <h4 class="title">我的联系方式</h4>
                    <p>微信<span class="WeChat">←左边二维码←</span></p>
                    <p>QQ<span class="iphone">305322403</span></p>
                    <p>邮箱<span class="email">305322403@qq.com</span></p>
                </div>
            </div>
        </div>

    </div>

    <div class="footer">
        <p>
            <span>© 2020</span>
            <span><a href="http://www.diyuzz.top" target="_blank">diyuzz.top</a></span>
            <span>欢迎来到diyuzz的小站~</span>
        </p>
        <p>
            <span><a href="https://beian.miit.gov.cn">@ViewBag.ICP</a></span>
            <span>
                <img src="~/BlogStatic/img/gaba.png" />
                <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=@ViewBag.GABEIAN">@ViewBag.GABEIANFULL</a>
            </span>
        </p>

        @*<div style="width:300px;margin:0 auto; padding:20px 0;">
            <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=13090202000469" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;"><img src="" style="float:left;" /><p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">冀公网安备 13090202000469号</p></a>
        </div>*@

    </div>


    <script src="~/BlogStatic/layui/layui.js"></script>

    @RenderSection("scripts", required: true)

    <script>
        //写入cookie
        function setCookie(name, value) {
            var Days = 30;
            var exp = new Date();
            exp.setTime(exp.getTime() + Days2460601000);
            document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
        }
        //获取cookie
        function getCookie(name) {
            var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
            if (arr = document.cookie.match(reg))
                return unescape(arr[2]);
            else
                return null;
        }
        //删除cookie
        function delCookie(name) {
            var exp = new Date();
            exp.setTime(exp.getTime() - 1);
            var cval = getCookie(name);
            if (cval != null)
                document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString();
        }
    </script>
</body>
</html>
